package cn.etg.day07;
/**
 * 使用线程方式一创建两个线程:分别输出1000次，你好和再见
 * @author Xiloer
 *
 */
public class Test01 {
    public static void main(String[] args) {
        Thread th1 = new way1_1();
        Thread th2 = new way1_2();
        th1.start();
        th2.start();
    }
}
class way1_1 extends Thread{

    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {
            System.out.println("你好");
        }
    }
}
class way1_2 extends Thread{

    @Override
    public void run() {
        for (int i = 0; i < 1000; i++) {
            System.out.println("再见");
        }
    }
}